<?
	$mtime = microtime();
	$mtime = explode(" ",$mtime);
	$mtime = $mtime[1] + $mtime[0];
	$debugtimer = $mtime;
	
	
	if(is_file("./include/head.inc.php")){
		include("./include/head.inc.php");
	}else{
		include("./error.php");
		exit;
	}

	if(isset($_GET['getforums']) || isset($_GET['getnew'])  || isset($_GET['getconf'])){
		include("./include/forum_client.php");
		exit;
	}

	$content="";
	$caption_main="test";


	$content_panel_left="";
	$content_panel_right="";
	include("./include/panel.php");


	$content.=parse_string($T_MAINF_S, array("@cont_l@","@cont_r@"), array($content_panel_left,$content_panel_right));

	if(isset($_GET['register'])){
		include("./include/register.inc.php");
	}elseif(isset($_GET['admin'])){
		include("./include/admin.inc.php");
	}elseif(isset($_GET['users'])){
		include("./include/users.inc.php");
	}elseif(isset($_GET['user'])){
		include("./include/user.inc.php");
	}elseif(isset($_GET['login'])){
		include("./include/login.inc.php");
	}elseif(isset($_GET['forum'])){
		include("./include/forum.inc.php");
	}elseif(isset($_GET['exit'])){
		include("./include/exit.inc.php");
	}elseif(isset($_GET['usercp'])){
		include("./include/usercp.inc.php");
	}else{
		$_GET['forum']="";
		include("./include/forum.inc.php");
	}


	$content.=parse_string($T_MAINF_E, array(), array());

	$content_head=parse_string($T_HEADF, array("@title@"), array($caption_main));

	echo $content_head;
	echo $content;
	

	$mtime = microtime();
	$mtime = explode(" ",$mtime);
	$mtime = $mtime[1] + $mtime[0];
	$debugtimer = $mtime - $debugtimer;
	//echo "<br>time: ".number_format($debugtimer,3);
	echo "\n<!--\nQueryCount: ".$dbQueryCount."\nTime: ".number_format($debugtimer,3)." sec\n-->";

?>
